package com.wwwarehouse.resource_center.adapter.rules;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author Joseph on 2017/11/13.
 *         <p/>
 */

public class TasksBuidNamesBean implements Parcelable {
    private String name , id;
    private boolean isSelected = false;

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.id);
        dest.writeByte(this.isSelected ? (byte) 1 : (byte) 0);
    }

    public TasksBuidNamesBean() {
    }

    protected TasksBuidNamesBean(Parcel in) {
        this.name = in.readString();
        this.id = in.readString();
        this.isSelected = in.readByte() != 0;
    }

    public static final Parcelable.Creator<TasksBuidNamesBean> CREATOR = new Parcelable.Creator<TasksBuidNamesBean>() {
        @Override
        public TasksBuidNamesBean createFromParcel(Parcel source) {
            return new TasksBuidNamesBean(source);
        }

        @Override
        public TasksBuidNamesBean[] newArray(int size) {
            return new TasksBuidNamesBean[size];
        }
    };
}
